/*
* 领料相关api
* */

import 'package:center_beijing/common/http_util.dart';


/*
* 获取收料单列表
* */
getReceivedEntryExList(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_omMaterialReceivedSheetHandler/getOmMaterialReceivedSheetExList",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}

/*
* 获取收料单图片
* */
getReceivedEntryExImage(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_omMaterialReceivedSheetHandler/listMaterialReceivedSheetAttach",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}


/*
* 获取收料单材料列表
* */
getReceivedMaterialEntryExList(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_omMaterialReceivedEntryHandler/getOmMaterialReceivedEntryExList",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}

/*
* 获取领料单列表
* */
getReceivedExList(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_omMaterialRequisitionHandler/getOmMaterialRequisitionExList",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}



/*
* 获取供应商
* */
getSupplier(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_materialSupplierHandler/getSectionMaterialSupplierExList",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}

/*
* 获取仓库
* */
getInWarehouse(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_materialWarehouseHandler/getMaterialWarehouseDorpList",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}


/*
* 新增收料单
* */
addReceivedSheet(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_omMaterialReceivedSheetHandler/saveOmMaterialReceivedSheet",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}

/*
* 规格型号
* */
allMaterialSpecNodes(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_materialSpecCatalogHandler/getChildMaterialSpecNodes",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}

/*
* 新增收料单明细
* */
addReceivedEntry(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_omMaterialReceivedEntryHandler/saveOmMaterialReceivedEntry",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}


/*
* 获取领料单材料列表(有审核)
* */
getRequisitionMaterialEntryExList(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_omMatRequisitionEntryAcceptHandler/getOmMatRequisitionEntryAcceptExList",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}
/*
* 获取领料单材料列表(无审核)
* */
getRequisitionMaterialEntryExListNo(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_omMatRequisitionEntryHandler/getOmMatRequisitionEntryExList",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}

/*
* 获取领用类型
* */
getRequisitionType(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_omMaterialRequisitionHandler/getOmMaterialRequisitionType",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}

/*
* 新增领料单
* */
addRequisition(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_omMaterialRequisitionHandler/saveOmMaterialRequisition",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}
/*
* 获取需求计划列表
* */
getMaterialRequirement(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_omMaterialRequirementEntryHandler/getMaterialRequirementEntryDropList",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}


/*
* 新增领料单明细(需要神审核)
* */
addMaterialRequisitionEntry(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_omMatRequisitionEntryAcceptHandler/saveBatchOmMaterialRequisitionEntry",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}
/*
* 新增领料单明细(不审核)
* */
addMaterialRequisitionEntryNo(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_omMatRequisitionEntryHandler/saveBatchOmMaterialRequisitionEntry",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}

/*
* 发起审批
* */
saveSubmitAccept(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_omMaterialRequisitionHandler/saveSubmitAccept",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}


/*
* 删除领料单(1)
* */
deleteMaterialOne(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_omMaterialRequisitionAcceptHandler/deleteOmMaterialRequisitionAccept",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}
/*
* 删除领料单(2)
* */
deleteMaterialTwo(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_omMaterialRequisitionHandler/deleteOmMaterialRequisition",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}


/*
* 删除领料单明细(1)
* */
deleteMaterialDetailOne(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_omMatRequisitionEntryAcceptHandler/deleteOmMatRequisitionEntryAccept",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}
/*
* 删除领料单明细(2)
* */
deleteMaterialDetailTwo(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_omMatRequisitionEntryHandler/deleteOmMatRequisitionEntry",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}





/*
* 删除收料单
* */
deleteReceivedSheet(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_omMaterialReceivedSheetHandler/deleteOmMaterialReceivedSheet",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}

/*
* 删除收料单详情
* */
deleteReceivedSheetDetail(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_omMaterialReceivedEntryHandler/deleteOmMaterialReceivedEntry",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}

/*
* 获取收料单详情
* */
getOmMaterialReceivedEntryEx(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_omMaterialReceivedEntryHandler/getOmMaterialReceivedEntryEx",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}

/*
* 领料单审批
* */
saveAcceptMatRequisition(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_omMaterialRequisitionHandler/saveAcceptMatRequisition",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}


/*
* 材料库存
* */
statMaterialInventoryBySpecAndHouseId(params) async {
  var responseJson = await HttpUtil().post("ccom/irest/base/ccom_omMaterialInventoryStatHandler/statMaterialInventoryBySpecAndHouseId",params);
  if(responseJson!=null){
    return responseJson;
  }else{
    return null;
  }
}

